package com.evil.application.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 控件权限配置表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@TableName(value = "evil_control_permission")
public class ControlPermission implements Serializable {

    /**
     * id
     */
    @TableId(value = "control_permission_id", type = IdType.AUTO)
    private Long controlPermissionId;

    /**
     * 企业id
     */
    @TableField(value = "enterprise_id")
    private Long enterpriseId;

    /**
     * 源类型(1-流程节点控件权限，2-报表控件权限)
     */
    @TableField(value = "source_type")
    private Integer sourceType;

    /**
     * 源id
     */
    @TableField(value = "source_id")
    private Long sourceId;

    /**
     * 表单控件id
     */
    @TableField(value = "control_id")
    private Long controlId;

    /**
     * 新增（0-否，1-是）
     */
    @TableField(value = "add_status")
    private Integer addStatus;

    /**
     * 编辑（0-否，1-是）
     */
    @TableField(value = "modify_status")
    private Integer modifyStatus;

    /**
     * 删除（0-否，1-是）
     */
    @TableField(value = "delete_status")
    private Integer deleteStatus;

    /**
     * 可见状态(0:不可见, 1:仅可见, 2:可编辑)
     */
    @TableField(value = "visible")
    private Integer visible;

    /**
     * 排序 越小越靠前
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 是否已删除(0:否, 1:是)
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * 创建人
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 创建人名字
     */
    @TableField(value = "creator_name")
    private String creatorName;

    /**
     * 修改操作人
     */
    @TableField(value = "modifier_id")
    private Long modifierId;

    /**
     * 修改操作人名字
     */
    @TableField(value = "modifier_name")
    private String modifierName;

    /**
     * 创建时间
     */
    @TableField(value = "created")
    private Date created;

    /**
     * 更新时间
     */
    @TableField(value = "updated")
    private Date updated;

    private static final long serialVersionUID = 1L;

    public static final String COL_CONTROL_PERMISSION_ID = "control_permission_id";

    public static final String COL_SOURCE_TYPE = "source_type";

    public static final String COL_SOURCE_ID = "source_id";

    public static final String COL_CONTROL_ID = "control_id";

    public static final String COL_ADD_STATUS = "add_status";

    public static final String COL_MODIFY_STATUS = "modify_status";

    public static final String COL_DELETE_STATUS = "delete_status";

    public static final String COL_VISIBLE = "visible";

    public static final String COL_SORT = "sort";

    public static final String COL_IS_DELETED = "is_deleted";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR_NAME = "creator_name";

    public static final String COL_MODIFIER_ID = "modifier_id";

    public static final String COL_MODIFIER_NAME = "modifier_name";

    public static final String COL_CREATED = "created";

    public static final String COL_UPDATED = "updated";
}